<style>
div#query_review_parent {
    position: absolute;
    top: 1px;
    left: 1px;
		z-index: 100000;
}

div.query_review_container {
    float: left;
}

div.query_review {
	height: 18px;
	margin: 1px;
	opacity: 0.75;
	padding-left: 3px;
	padding-right: 3px;
	border: 1px solid black;
	font-size: 12px;
	font-weight: bold;
  text-align: left;
}

div.query_review.sql_ok {
	background-color: #090;
	color: #020;
}

div.query_review.sql_warning {
	background-color: #FAE100;
	color: #F05000;
}

div.query_review.sql_critical {
	background-color: #F99;
	color: #A00;
}

div.query_review.sql_disabled {
	background-color: #BBB;
	color: #555;
}

div.query_review a {
	color: inherit;
	text-decoration: none;
}

div.query_review_details {
	width: 900px;
	height: 600px;
	opacity: 0.9;
	margin: 1px;
	padding: 2px;
	border: 1px solid black;
	font-size: 12px;
	overflow: auto;
	background-color: #DDD;
  text-align: left;
  text-indent: 0px;
  color: black;
}

div.query_review_details p {
	margin: 2px 0 2px 0;
	padding: 0px;
}

div.query_review_details a {
	color: #29ABE2;
}

div.query_review_details ul {
	list-style-type: circle;
	padding-left: 15px;
}

div.query_review_details li {
  clear: both;
}

div.query_review_details code {
	white-space: normal;
	line-height: 120%;
}

div.query_review_details table.explain th {
	cell-padding: 5px;
}

div.query_review_details .title {
	font-weight: bold;
}

div.query_review_details .indent {
	padding-left: 10px;
}

div.query_review_details .number {
	font-weight: bold;
}

div.query_review_details .bad {
	color: #900;
}

div.query_review_details .good {
	color: #090;
}

div.query_review_details div.divider {
	width: 504px;
	position: relative;
	left: -2px;
	height: 1px;
	border-top: 1px dashed black;
	margin: 2px 0 2px 0;
}

div.query_review_details .small {
	font-size: 10px;
}

div.query_review_details .tbpadded {
	padding-top: 3px;
	padding-bottom: 3px;
}

div.query_review_details .trace {
	background-color: #0C1021;
	color: #7F908A;
	padding: 5px;
	margin-right: 30px;
}

div.query_review_details .trace .bold {
	color: white;
}

div.query_review_details div.spectrum_container {
	margin-top: 4px;
	width: 35px;
	display: block;
	float: left;
	position: relative;
	height: 14px;
	margin-right: 5px;
}

div.query_review_details div.spectrum_elem {
	width: 1px;
	display: block;
	float: left;
	height: 10px;
}
div.query_review_details div.spectrum_pointer {
	width: 2px;
	display: block;
	float: left;
	position: absolute;
	height: 14px;
	background-color: black;
	top: -2px;
}

div.query_review_details table {
	background-color: white;
	border: 1px solid gray;
	padding: 0px;
	margin: 0px;
}

div.query_review_details tbody {
	border: 0px;
	padding: 0px;
	margin: 0px;
}

div.query_review_details thead {
	border-bottom: 1px solid gray;
	padding: 0px;
	margin: 0px;
}


div.query_review_details tr {
	border: 0px;
	padding: 0px;
	margin: 0px;
}

div.query_review_details td {
	border: 1px solid gray;
	padding: 3px;
	margin: 0px;
    overflow: hidden;
}

div.query_review_details th {
	border: 1px solid gray;
	padding: 3px;
	margin: 0px;
}

</style>

<style>
.sql {
	color: black;
}
.sql .String {
	color: #009933;
}
.sql .Keyword {
	color: #0000FF;
}
.sql .Constant {
	color: #6782D3;
}
.sql .Number {
	color: #0066FF;
}
.sql .Comment {
   color: #0066FF;
   font-style: italic;
}
</style>

<script type="text/javascript">
//Super lame show/hide functions so we don't need any 3rd party JS libs
function query_review_show(id) {
	document.getElementById(id).style.display = "block";
}

function query_review_hide(id) {
	document.getElementById(id).style.display = "none";
}
function query_review_toggle(id) {
	if(document.getElementById(id).style.display == "none") {
		document.getElementById(id).style.display = "block";
	} else {
		document.getElementById(id).style.display = "none";
	}
}
function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}

function ignore_list() {
	var ignore_list = readCookie("query_review_ignore_list")
	if (!ignore_list)
		ignore_list = []
	else
		ignore_list = ignore_list.split(",")
	return ignore_list
}

function add_ignore_hash(h){
	var list = ignore_list();
	list[list.length] = h
	createCookie("query_review_ignore_list", list.join(","))
}

function remove_ignore_hash(h) {
	var list = ignore_list();
	var new_list = []
	for(var i=0; i<list.length; i++)
	{
		if(list[i].toString() != h.toString()) {
			new_list[new_list.length] = list[i]
		}
	}
	createCookie("query_review_ignore_list", new_list.join(","))
}
</script>
